﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using OilRigSumoWrestlers.Actions;
using OilRigSumoWrestlers.Controllables.GameModes;
using OilRigSumoWrestlers.Levels;
using RaptorEngine;
using RaptorEngine.Components;
using RaptorEngine.Components.CollidableComponent;
using RaptorEngine.Components.Drawable;

namespace OilRigSumoWrestlers.Scenes
{
	public class Level2Scene : Scene
	{
		public Level2Scene(Entity player1, Entity player2, bool network)
			: base(network)
		{
			Camera = new Camera(new Vector3(25, 0, 25), new Vector3(25, 70, 70));
			player1.Position = new Vector3(player1.Position.X + 10, player1.Position.Y, player1.Position.Z + 10);
			player2.Position = new Vector3(player2.Position.X + 10, player2.Position.Y, player2.Position.Z + 10);
			AddEntity(player1);
			AddEntity(player2);

            //Level structure
			Level2 level2 = new Level2();
		    foreach (Entity tile in level2.GetAllTiles())
		    {
                AddEntity(tile);
		    }

			//GameMode
			Entity gamemode = new Entity();
			KnockoutMode ko = new KnockoutMode(gamemode, player1, player2, -20f, 3);
			gamemode.AddComponent(ko);
			AddEntity(gamemode);
		}
	}
}
